cargo.git
9 years agoAuto merge of #3253 - nipunn1313:exe, r=alexcrichton
bors [Fri, 4 Nov 2016 18:35:23 +0000 (11:35 -0700)]
Auto merge of #3253 - nipunn1313:exe, r=alexcrichton

Add an [EXE] hamcrest substitution for file extension

This should make the testing a bit more precise as to whether
we expect targets of the form foo.exe vs foo-abc123.exe. I
was also considering adding a [/] substitution for the fwd
slash vs backslash [..], but thought I would leave that to another PR
if we thought that was a good idea.

9 years agoBackticks to tests/build-script.rs
Nipunn Koorapati [Fri, 4 Nov 2016 08:00:09 +0000 (19:00 +1100)]
Backticks to tests/build-script.rs

9 years agoBuild scripts don't have .exe appended
Nipunn Koorapati [Fri, 4 Nov 2016 07:37:02 +0000 (18:37 +1100)]
Build scripts don't have .exe appended

9 years agoFix bench_dylib for win
Nipunn Koorapati [Fri, 4 Nov 2016 06:29:05 +0000 (17:29 +1100)]
Fix bench_dylib for win

9 years agoAdd an [EXE] hamcrest substitution for file extension
Nipunn Koorapati [Fri, 4 Nov 2016 05:21:43 +0000 (16:21 +1100)]
Add an [EXE] hamcrest substitution for file extension

This should make the testing a bit more precise as to whether
we expect targets of the form foo.exe vs foo-abc123.exe. I
was also considering adding a [/] substitution for the fwd
slash vs backslash [..], but thought I would leave that to another PR
if we thought that was a good idea.

9 years agoAuto merge of #3248 - alexcrichton:bad2, r=brson
bors [Thu, 3 Nov 2016 16:02:30 +0000 (09:02 -0700)]
Auto merge of #3248 - alexcrichton:bad2, r=brson

Default urls in [replace] to crates.io

The intention was to do this, and it mistakenly didn't happen!

Closes #3235

9 years agoDefault urls in [replace] to crates.io
Alex Crichton [Wed, 2 Nov 2016 17:32:35 +0000 (10:32 -0700)]
Default urls in [replace] to crates.io

The intention was to do this, and it mistakenly didn't happen!

Closes #3235

9 years agoAuto merge of #3243 - alexcrichton:target-feature, r=brson
bors [Thu, 3 Nov 2016 04:26:37 +0000 (21:26 -0700)]
Auto merge of #3243 - alexcrichton:target-feature, r=brson

Expose rustc cfg values to build scripts

This commit is Cargo's portion of the implementation of [RFC 1721] where it will
expose values printed by `rustc --print cfg` to build scripts.

[RFC 1721]: https://github.com/rust-lang/rfcs/blob/master/text/1721-crt-static.md

This will in turn be used to communicate features like `-C
target-feature=+crt-static` which can be used to compile objects for statically
linking against the msvcrt on MSVC.

9 years agoAuto merge of #3220 - alexcrichton:bad, r=brson
bors [Thu, 3 Nov 2016 02:12:37 +0000 (19:12 -0700)]
Auto merge of #3220 - alexcrichton:bad, r=brson

Load [replace] sections from lock files

This commit fixes a bug in Cargo where path-based [replace] dependencies were
accidentally not loaded from lock files. This meant that even with a lock
file some compilations could accidentally become nondeterministic. The fix here
is to just look at all path dependencies, even those specified through [replace]

Closes #3216

9 years agoAuto merge of #3175 - alexcrichton:bench-abort, r=brson
bors [Thu, 3 Nov 2016 00:21:23 +0000 (17:21 -0700)]
Auto merge of #3175 - alexcrichton:bench-abort, r=brson

Ignore `panic` configuration for test/bench profiles

Both of these profiles link to libtest, so it's invalid to configure them with
`panic="abort"`. To prevent confusing errors just ignore the configuration for
now.

Closes #3166

9 years agoExpose rustc cfg values to build scripts
Alex Crichton [Mon, 31 Oct 2016 23:20:38 +0000 (16:20 -0700)]
Expose rustc cfg values to build scripts

This commit is Cargo's portion of the implementation of [RFC 1721] where it will
expose values printed by `rustc --print cfg` to build scripts.

[RFC 1721]: https://github.com/rust-lang/rfcs/blob/master/text/1721-crt-static.md

This will in turn be used to communicate features like `-C
target-feature=+crt-static` which can be used to compile objects for statically
linking against the msvcrt on MSVC.

9 years agoAuto merge of #3246 - alexcrichton:mtimes-in-the-past, r=alexcrichton
bors [Wed, 2 Nov 2016 17:55:33 +0000 (10:55 -0700)]
Auto merge of #3246 - alexcrichton:mtimes-in-the-past, r=alexcrichton

Continuation of #2880

Just applied a patch to help fix the tests.

9 years agoAuto merge of #3247 - alexcrichton:doc-plugin, r=alexcrichton
bors [Wed, 2 Nov 2016 16:37:00 +0000 (09:37 -0700)]
Auto merge of #3247 - alexcrichton:doc-plugin, r=alexcrichton

Continuation of #3114

Added a test

9 years agoAdd a test for the previous PR
Alex Crichton [Wed, 2 Nov 2016 16:36:23 +0000 (09:36 -0700)]
Add a test for the previous PR

9 years agoMerge branch 'issue3107-doc-and-targets' of https://github.com/Phaiax/cargo into...
Alex Crichton [Wed, 2 Nov 2016 16:36:18 +0000 (09:36 -0700)]
Merge branch 'issue3107-doc-and-targets' of https://github.com/Phaiax/cargo into doc-plugin

9 years agoFix some tests from the previous merge
Alex Crichton [Wed, 2 Nov 2016 16:18:30 +0000 (09:18 -0700)]
Fix some tests from the previous merge

9 years agoMerge branch 'mtimes-in-the-past' of https://github.com/integer32llc/cargo into mtime...
Alex Crichton [Wed, 2 Nov 2016 16:14:25 +0000 (09:14 -0700)]
Merge branch 'mtimes-in-the-past' of https://github.com/integer32llc/cargo into mtimes-in-the-past

9 years agoIgnore `panic` configuration for test/bench profiles
Alex Crichton [Thu, 6 Oct 2016 22:32:15 +0000 (15:32 -0700)]
Ignore `panic` configuration for test/bench profiles

Both of these profiles link to libtest, so it's invalid to configure them with
`panic="abort"`. To prevent confusing errors just ignore the configuration for
now.

Closes #3166

9 years agoAuto merge of #3242 - jhbabon:cfgs-flags-per-package, r=alexcrichton
bors [Tue, 1 Nov 2016 23:06:35 +0000 (16:06 -0700)]
Auto merge of #3242 - jhbabon:cfgs-flags-per-package, r=alexcrichton

FIX: Call rustdoc test with the correct cfg flags of a package.

There was a situation in which if you you had a lib that depends on a package with features, whenever you ran the tests for the package the `rustdoc test` call was failing because it was called with the root `cfg` flags, not the package `cfg` flags.

This fix solves the issue by keeping track of the `cfg` flags per package, so the `rustdoc` command will be generated with the correct `cfg` flags.

Closes #3172

9 years agoAdd text language to code bloks in machine-readable-output.md
Juan Hernández [Tue, 1 Nov 2016 17:16:55 +0000 (18:16 +0100)]
Add text language to code bloks in machine-readable-output.md

Travis fails when running `make doc` because of this file.
This should fix the issue.

9 years agoRelax conditions in rustdoc test cfg flags tests.
Juan Hernández [Tue, 1 Nov 2016 17:14:41 +0000 (18:14 +0100)]
Relax conditions in rustdoc test cfg flags tests.

In Windows the rustdoc test output sets more double quotes, so
the test doesn't pass. We need to relax the test so it pass in
*NIX and Windows environments.

9 years agoUse better iter() semantics to collect cfg flags.
Juan Hernández [Mon, 31 Oct 2016 22:54:04 +0000 (23:54 +0100)]
Use better iter() semantics to collect cfg flags.

9 years agoFIX: Call rustdoc test with the correct cfg flags of a package.
Juan Hernández [Mon, 31 Oct 2016 18:15:03 +0000 (19:15 +0100)]
FIX: Call rustdoc test with the correct cfg flags of a package.

There was a situation in which if you you had a lib that depends
on a package with features, whenever you ran the tests for the
package the `rustdoc test` call was failing because rustdoc
was called with the root cfg flags, not the package cfg flags.

This fix solves the issue by keeping track of the cfg flags
per package, so the rustdoc command will be generated with
the correct cfg flags.

9 years agoAuto merge of #3241 - alexcrichton:curl-update, r=alexcrichton
bors [Mon, 31 Oct 2016 18:28:31 +0000 (11:28 -0700)]
Auto merge of #3241 - alexcrichton:curl-update, r=alexcrichton

Update curl and curl-sys

Pick up a few security related fixes in libcurl

9 years agoUpdate curl and curl-sys
Alex Crichton [Mon, 31 Oct 2016 18:27:31 +0000 (11:27 -0700)]
Update curl and curl-sys

Pick up a few security related fixes in libcurl

9 years agoAuto merge of #3213 - matklad:simler-locks, r=alexcrichton
bors [Mon, 31 Oct 2016 04:15:00 +0000 (21:15 -0700)]
Auto merge of #3213 - matklad:simler-locks, r=alexcrichton

Append only git checkouts

Ok, so this should fix #3209 by using a full git revision as the name of the checkout path.

I don't fully understand the code here, and I haven't thought about backwards/forwards compatibility hard, but the approach should be viable, and maybe even the implementation here is OK?

9 years agoAuto merge of #3238 - alexcrichton:fix-dox, r=alexcrichton
bors [Mon, 31 Oct 2016 02:06:06 +0000 (19:06 -0700)]
Auto merge of #3238 - alexcrichton:fix-dox, r=alexcrichton

Render machine-readable-output docs

Closes #3237

9 years agoRender machine-readable-output docs
Alex Crichton [Mon, 31 Oct 2016 02:05:39 +0000 (19:05 -0700)]
Render machine-readable-output docs

Closes #3237

9 years agoAuto merge of #3231 - TimNN:patch-1, r=alexcrichton
bors [Wed, 26 Oct 2016 17:02:31 +0000 (10:02 -0700)]
Auto merge of #3231 - TimNN:patch-1, r=alexcrichton

Fix rust-lang/rust#35203 warning/error

rust-lang/rust#35203 made patterns in functions without body into a warn by default lint (which is being `deny`ed here).

cc rust-lang/rust#37378, rust-lang/rust#37416

9 years agoAuto merge of #3179 - alexcrichton:fix-features-mulitple, r=matklad
bors [Wed, 26 Oct 2016 15:45:29 +0000 (08:45 -0700)]
Auto merge of #3179 - alexcrichton:fix-features-mulitple, r=matklad

Parse --features in `cargo metadata` the same

This accidentally didn't accept space-separated features passed through
`--features` as the logic for doing the splitting wasn't shared. Let's share it!

9 years agoFix rust-lang/rust#35203 warning/error
Tim Neumann [Wed, 26 Oct 2016 15:25:15 +0000 (17:25 +0200)]
Fix rust-lang/rust#35203 warning/error

rust-lang/rust#35203 made patterns in functions without body into a warn by default lint (which is being `deny`ed here).

9 years agoAuto merge of #3230 - alexcrichton:better-download, r=alexcrichton
bors [Wed, 26 Oct 2016 02:46:42 +0000 (19:46 -0700)]
Auto merge of #3230 - alexcrichton:better-download, r=alexcrichton

Download mingw from more reliable location

Use the same "mirror" the rust repo uses

9 years agoDownload mingw from more reliable location
Alex Crichton [Wed, 26 Oct 2016 02:46:09 +0000 (19:46 -0700)]
Download mingw from more reliable location

Use the same "mirror" the rust repo uses

9 years agoAuto merge of #3217 - alexcrichton:fix-regression, r=brson
bors [Wed, 26 Oct 2016 00:00:14 +0000 (17:00 -0700)]
Auto merge of #3217 - alexcrichton:fix-regression, r=brson

Ignore summaries in downloaded crates

Unfortunately historical Cargo bugs have made it such that the index sometimes
differs from the actual crate we download. Let's respect the index, however,
which should be our source of truth.

Closes #3214

9 years agoIgnore summaries in downloaded crates
Alex Crichton [Thu, 20 Oct 2016 22:07:18 +0000 (15:07 -0700)]
Ignore summaries in downloaded crates

Unfortunately historical Cargo bugs have made it such that the index sometimes
differs from the actual crate we download. Let's respect the index, however,
which should be our source of truth.

Closes #3214

9 years agoAuto merge of #3229 - martinhath:master, r=alexcrichton
bors [Tue, 25 Oct 2016 21:18:01 +0000 (14:18 -0700)]
Auto merge of #3229 - martinhath:master, r=alexcrichton

Add fix and test for #3224

This commit fixes #3224, and adds a test for it.
First time contributor to Cargo here, so I'm sorry if I put stuff the wrong places :)

9 years agoAdd fix and test for #3224
Martin Hafskjold Thoresen [Tue, 25 Oct 2016 18:52:47 +0000 (20:52 +0200)]
Add fix and test for #3224

9 years agoAuto merge of #3226 - alexcrichton:more-cross, r=alexcrichton
bors [Tue, 25 Oct 2016 05:31:40 +0000 (22:31 -0700)]
Auto merge of #3226 - alexcrichton:more-cross, r=alexcrichton

Download more cross builds

9 years agoDownload more cross builds
Alex Crichton [Tue, 25 Oct 2016 03:29:21 +0000 (20:29 -0700)]
Download more cross builds

9 years agoLoad [replace] sections from lock files
Alex Crichton [Fri, 21 Oct 2016 02:02:38 +0000 (19:02 -0700)]
Load [replace] sections from lock files

This commit fixes a bug in Cargo where path-based [replace] dependencies were
accidentally not loaded from lock files. This meant that even with a lock
file some compilations could accidentally become nondeterministic. The fix here
is to just look at all path dependencies, even those specified through [replace]

Closes #3216

9 years agoAuto merge of #2818 - robinst:use-exec-for-cargo-run, r=alexcrichton
bors [Thu, 20 Oct 2016 17:58:29 +0000 (10:58 -0700)]
Auto merge of #2818 - robinst:use-exec-for-cargo-run, r=alexcrichton

Use CommandExt::exec for `cargo run` on Unix (#2343)

Before, we would spawn a child process for the program. One of the
problems with that is when killing the cargo process, the program
continues running.

With this change, the cargo process is replaced by the program, and
killing it works.

Before (`cargo run` is the parent):

> 502  7615  7614   0  2:26PM ttys012    0:00.12 /Users/rstocker/.multirust/toolchains/stable-x86_64-apple-darwin/bin/cargo run
> 502  7620  7615   0  2:26PM ttys012    0:00.01 target/debug/program

After (the shell is the parent):

> 502 81649 81648   0  5:27PM ttys012    0:00.69 -zsh
> 502  7739 81649   0  2:26PM ttys012    0:01.27 target/debug/program

9 years agoParse --features in `cargo metadata` the same
Alex Crichton [Fri, 7 Oct 2016 16:50:29 +0000 (09:50 -0700)]
Parse --features in `cargo metadata` the same

This accidentally didn't accept space-separated features passed through
`--features` as the logic for doing the splitting wasn't shared. Let's share it!

9 years agoUse CommandExt::exec for `cargo run` on Unix (#2343)
Robin Stocker [Fri, 1 Jul 2016 04:31:36 +0000 (14:31 +1000)]
Use CommandExt::exec for `cargo run` on Unix (#2343)

Before, we would spawn a child process for the program. One of the
problems with that is when killing the cargo process, the program
continues running.

With this change, the cargo process is replaced by the program, and
killing it works.

9 years agoAppend only git checkouts
Aleksey Kladov [Wed, 19 Oct 2016 17:36:41 +0000 (20:36 +0300)]
Append only git checkouts

9 years agoAuto merge of #3149 - cardoe:fix-pkgid-cmd, r=alexcrichton
bors [Tue, 18 Oct 2016 16:07:50 +0000 (09:07 -0700)]
Auto merge of #3149 - cardoe:fix-pkgid-cmd, r=alexcrichton

pkgid cmd: fix help msg with multiple packages

When there are multiple versions of a package that match a given spec
the command tells you to re-run it with the `-p` argument which does not
exist. The command appears to work without it properly.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
9 years agopkgid: add the -p flag as the output suggests
Doug Goldstein [Tue, 18 Oct 2016 05:24:53 +0000 (00:24 -0500)]
pkgid: add the -p flag as the output suggests

When you use this command and there are multiple packages that match
this spec, the help instructions tell you to rerun it with the -p
argument which was previously not present. Since the code paths are
shared with 'cargo build' and 'cargo update', this adds the -p argument
to 'cargo pkgid' to make things more consistent.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
9 years agoAuto merge of #3207 - steveklabnik:gh3202, r=alexcrichton
bors [Mon, 17 Oct 2016 20:19:22 +0000 (13:19 -0700)]
Auto merge of #3207 - steveklabnik:gh3202, r=alexcrichton

bump semver to 0.5.1

Fixes #3202

I've verified locally that this works, and have a test for it within semver. Two, actually.

@censoredusername if you could give this a shot to double check that it fixes your exact bug, that'd be cool.

9 years agobump semver to 0.5.1
Steve Klabnik [Mon, 17 Oct 2016 18:42:20 +0000 (14:42 -0400)]
bump semver to 0.5.1

Fixes #3202

9 years agoAuto merge of #3205 - matklad:fix-rustdoc-ld-path, r=alexcrichton
bors [Mon, 17 Oct 2016 15:47:36 +0000 (08:47 -0700)]
Auto merge of #3205 - matklad:fix-rustdoc-ld-path, r=alexcrichton

Pass target environment for rustdoc

This should fix #3200, but I am not sure that this is a correct fix, and I need some input to figure this out.

`rustdoc` is invoked in two places, in `cargo_test.rs` and in `cargo_rustc/mod.rs`. Before the refactoring PR, these invocations used different LD_LIBRARY paths. [The one in cargo_rustc](https://github.com/rust-lang/cargo/pull/3198/files#diff-59acd1a3101aebbb591ac7ab51c19d9eR427) used "host" version, while [the one in cargo_test](https://github.com/rust-lang/cargo/blob/a8baa5b8f36e88170c8c56523b6eb72efc2cc55e/src/cargo/ops/cargo_test.rs#L131) used "target" version.

The original PR changed both to "host", this PR switches both to "target". Is this correct, or should we stick with different environments for building documentation and doctests?

9 years agoPass target environment for rustdoc
Aleksey Kladov [Mon, 17 Oct 2016 13:40:27 +0000 (16:40 +0300)]
Pass target environment for rustdoc

9 years agoAuto merge of #3201 - alexcrichton:more-cross, r=alexcrichton
bors [Sat, 15 Oct 2016 07:48:19 +0000 (00:48 -0700)]
Auto merge of #3201 - alexcrichton:more-cross, r=alexcrichton

Prepare for more cross-compiled Cargos

Update deps, add support, ensure everything compiles right.

9 years agoPrepare for more cross-compiled Cargos
Alex Crichton [Sat, 15 Oct 2016 07:47:47 +0000 (00:47 -0700)]
Prepare for more cross-compiled Cargos

Update deps, add support, ensure everything compiles right.

9 years agoAuto merge of #3198 - matklad:kill-command-type, r=alexcrichton
bors [Thu, 13 Oct 2016 18:22:15 +0000 (11:22 -0700)]
Auto merge of #3198 - matklad:kill-command-type, r=alexcrichton

Remove CommandType struct

This removes `CommandType` struct as well as `cargo_rustc::process` function. So now all process creation goes thorough methods of `Compilation`.

This does change search path order from `util::dylib_path(), host_dylib_path()` to `host_dylib_path(), util::dylib_path()`, but I hope this is not a problem.

This also uncovers the fact that `rustdoc` is run sometimes with and sometimes without `host_dylib_path`. Is this intentional?

9 years agoStore host dylib path in compilation
Aleksey Kladov [Thu, 13 Oct 2016 16:30:59 +0000 (19:30 +0300)]
Store host dylib path in compilation

9 years agoRemove CommandType struct
Aleksey Kladov [Thu, 13 Oct 2016 15:36:12 +0000 (18:36 +0300)]
Remove CommandType struct

9 years agoAuto merge of #3193 - matklad:kill-command-proto, r=alexcrichton
bors [Wed, 12 Oct 2016 14:24:47 +0000 (07:24 -0700)]
Auto merge of #3193 - matklad:kill-command-proto, r=alexcrichton

Remove command prototype

A followup of #3177 . I am not sure, but perhaps we can remove/refactor `CommandType` as well: for each command variant, `Compilation` as a public dedicated method, but it also has a generic one (`process`) (haha: https://github.com/rust-lang/cargo/pull/1107/files#r22429844).

9 years agoRemove command prototype
Aleksey Kladov [Wed, 12 Oct 2016 11:39:46 +0000 (14:39 +0300)]
Remove command prototype

9 years agoAuto merge of #3187 - edunham:appveyor-gnu, r=alexcrichton
bors [Tue, 11 Oct 2016 20:40:36 +0000 (13:40 -0700)]
Auto merge of #3187 - edunham:appveyor-gnu, r=alexcrichton

Add GNU triples for #3186

Resources used to take an educated guess at this:
* Servo's appveyor.yml
* Rust's Buildbot config
* Alex
* Some random appveyor config that Alex had sitting around

Let's see if it works!

9 years agoUse a MinGW that doesn't break pthreads
E. Dunham [Mon, 10 Oct 2016 19:33:22 +0000 (12:33 -0700)]
Use a MinGW that doesn't break pthreads

Also correct the bits to triples mapping, because tyops

9 years agoExpand matrix for #3186
E. Dunham [Mon, 10 Oct 2016 18:11:56 +0000 (11:11 -0700)]
Expand matrix for #3186

9 years agoAuto merge of #3189 - edunham:fix-empty-path-bug, r=alexcrichton
bors [Tue, 11 Oct 2016 17:45:15 +0000 (10:45 -0700)]
Auto merge of #3189 - edunham:fix-empty-path-bug, r=alexcrichton

Make it possible for windows-gnu tests to pass

Skip test that uses empty path on Windows, because Windows doesn't do the empty path thing.

9 years agoempty path is not a thing on Windows
E. Dunham [Mon, 10 Oct 2016 22:15:08 +0000 (15:15 -0700)]
empty path is not a thing on Windows

9 years agoAuto merge of #3185 - semarie:bump-hamcrest, r=alexcrichton
bors [Mon, 10 Oct 2016 19:44:07 +0000 (12:44 -0700)]
Auto merge of #3185 - semarie:bump-hamcrest, r=alexcrichton

bump hamcrest to 0.1.1

update hamcrest to 0.1.1 and its dependencies.

Closes: #3181
9 years agobump hamcrest to 0.1.1
Sébastien Marie [Mon, 10 Oct 2016 10:08:48 +0000 (12:08 +0200)]
bump hamcrest to 0.1.1

9 years agoAuto merge of #3183 - rjgoldsborough:broken-docs-links, r=alexcrichton
bors [Sun, 9 Oct 2016 17:12:36 +0000 (10:12 -0700)]
Auto merge of #3183 - rjgoldsborough:broken-docs-links, r=alexcrichton

removing return false causing links to break

Gah! Sorry about that.

fixes #3182

I added a `return false` to the function above to prevent it from toggling itself back off but for some reason put one here as well which stopped the event before the link could fire.

9 years agoremoving return false causing links to break
Jake Goldsborough [Sun, 9 Oct 2016 00:30:55 +0000 (17:30 -0700)]
removing return false causing links to break

9 years agoAuto merge of #3160 - alexcrichton:rustc-to-proc, r=alexcrichton
bors [Fri, 7 Oct 2016 21:20:26 +0000 (14:20 -0700)]
Auto merge of #3160 - alexcrichton:rustc-to-proc, r=alexcrichton

Blanket rename rustc-macro to proc-macro

9 years agoAuto merge of #3154 - steveklabnik:gh3124, r=alexcrichton
bors [Fri, 7 Oct 2016 20:09:27 +0000 (13:09 -0700)]
Auto merge of #3154 - steveklabnik:gh3124, r=alexcrichton

upgrade semver

This is a spike at fixing #3124.

@alexcrichton I'm not sure how to actually emit the error message here. In the TOML example you linked me: https://github.com/rust-lang/cargo/blob/5593045ddef2744c1042dee0c0037c2ebcc1834e/src/cargo/util/toml.rs#L166

That takes a Config as an argument. This function does not. What's the right approach here?

Also, this code is messy. I am 99% sure I can write it nicer with combinators. This is just to get the discussion going.

9 years agoBump to semver@0.5.0
Steve Klabnik [Fri, 7 Oct 2016 20:03:08 +0000 (16:03 -0400)]
Bump to semver@0.5.0

9 years agoAdd a test for deprecation warnings
Alex Crichton [Fri, 7 Oct 2016 19:43:48 +0000 (12:43 -0700)]
Add a test for deprecation warnings

9 years agoTweak message in Dependency::parse
Alex Crichton [Fri, 7 Oct 2016 19:34:00 +0000 (12:34 -0700)]
Tweak message in Dependency::parse

Provide some contextual information about why a dependency failed to parse.

9 years agoAuto merge of #3177 - matklad:kill-exec-engine, r=alexcrichton
bors [Fri, 7 Oct 2016 18:41:31 +0000 (11:41 -0700)]
Auto merge of #3177 - matklad:kill-exec-engine, r=alexcrichton

Remove ExecEngine abstraction

Hi! Not sure what was the idea behind exec engine (perhaps to allow swapping it out during tests?), but looks like it does absolutely nothing at the moment, and can be removed.

9 years agoRevert addition of a number of Config params
Alex Crichton [Fri, 7 Oct 2016 18:07:37 +0000 (11:07 -0700)]
Revert addition of a number of Config params

9 years agosimplify slightly
Steve Klabnik [Mon, 3 Oct 2016 21:21:46 +0000 (17:21 -0400)]
simplify slightly

9 years agoPrint the warning
Steve Klabnik [Mon, 3 Oct 2016 20:55:24 +0000 (16:55 -0400)]
Print the warning

9 years agothread a config throughout
Steve Klabnik [Mon, 3 Oct 2016 20:40:57 +0000 (16:40 -0400)]
thread a config throughout

9 years agoupgrade semver
Steve Klabnik [Mon, 3 Oct 2016 18:41:02 +0000 (14:41 -0400)]
upgrade semver

9 years agoAuto merge of #3171 - alexcrichton:travis, r=alexcrichton
bors [Fri, 7 Oct 2016 17:55:46 +0000 (10:55 -0700)]
Auto merge of #3171 - alexcrichton:travis, r=alexcrichton

Fix Travis OSX

They recently changed images, gotta tweak how we work with OpenSSL

9 years agoFix Travis OSX
Alex Crichton [Thu, 6 Oct 2016 16:48:12 +0000 (09:48 -0700)]
Fix Travis OSX

They recently changed images, gotta tweak how we work with OpenSSL

9 years agoRemove ExecEngine abstraction
Aleksey Kladov [Fri, 7 Oct 2016 12:01:38 +0000 (15:01 +0300)]
Remove ExecEngine abstraction

9 years agoAuto merge of #3168 - rjgoldsborough:docs-menu-click-busted-2865, r=alexcrichton
bors [Fri, 7 Oct 2016 00:08:12 +0000 (17:08 -0700)]
Auto merge of #3168 - rjgoldsborough:docs-menu-click-busted-2865, r=alexcrichton

tweaking the way the dropdown opens to fix links not working

fixes #2865

9 years agoAuto merge of #3000 - matklad:error-format, r=alexcrichton
bors [Thu, 6 Oct 2016 21:03:22 +0000 (14:03 -0700)]
Auto merge of #3000 - matklad:error-format, r=alexcrichton

Add --message-format flag.

Closes #2982

This adds a `--message-format` flag with values `human` or `json-v1` to commands that may trigger compilation.

After the discussion in the issue I am no longer sure that this is a way to go:

* Looks like it buys nothing compared to `RUST_FLAGS` approach: a flag is more useful on the command line, but from the tool point of view there should be no significant differences between a flag and an environmental variable.

* Looks like we really want to wrap compiler's messages into our own json to tie them to particular compilation.

9 years agoBlanket rename rustc-macro to proc-macro
Alex Crichton [Tue, 4 Oct 2016 16:58:28 +0000 (09:58 -0700)]
Blanket rename rustc-macro to proc-macro

9 years agoAuto merge of #3170 - alexcrichton:ignore-rustc-macro, r=alexcrichton
bors [Thu, 6 Oct 2016 16:47:21 +0000 (09:47 -0700)]
Auto merge of #3170 - alexcrichton:ignore-rustc-macro, r=alexcrichton

Ignore rustc-macro tests for now

We need to ignore them to land rust-lang/rust#36945 and after that we'll shortly
re-enable them.

9 years agoIgnore rustc-macro tests for now
Alex Crichton [Thu, 6 Oct 2016 16:46:32 +0000 (09:46 -0700)]
Ignore rustc-macro tests for now

We need to ignore them to land rust-lang/rust#36945 and after that we'll shortly
re-enable them.

9 years agoAuto merge of #3162 - alexcrichton:ugh-mspdbsrv, r=brson
bors [Thu, 6 Oct 2016 05:47:07 +0000 (22:47 -0700)]
Auto merge of #3162 - alexcrichton:ugh-mspdbsrv, r=brson

Leak mspdbsrv.exe processes on Windows

Instead of having our job object tear them down, instead leak them intentionally
if everything succeeded.

Closes #3161

9 years agoAuto merge of #3146 - alexcrichton:install-same-workspace, r=brson
bors [Thu, 6 Oct 2016 04:33:12 +0000 (21:33 -0700)]
Auto merge of #3146 - alexcrichton:install-same-workspace, r=brson

Use workspaces during `cargo install`

Prevent lock files from oscillating.

Closes #3133

9 years agoAuto merge of #3137 - alexcrichton:bump-curl, r=brson
bors [Thu, 6 Oct 2016 03:48:12 +0000 (20:48 -0700)]
Auto merge of #3137 - alexcrichton:bump-curl, r=brson

Update curl to track more error info

This hopefully will help out with https://github.com/rust-lang/cargo/issues/2464#issuecomment-250583778 by including https://github.com/alexcrichton/curl-rust/commit/07323ab5e868babb7a5437e8d2604761b913dab3 which should give us more information from libcurl

9 years agoAuto merge of #3145 - alexcrichton:rustdoc-cross-test, r=brson
bors [Thu, 6 Oct 2016 02:26:10 +0000 (19:26 -0700)]
Auto merge of #3145 - alexcrichton:rustdoc-cross-test, r=brson

Test requested --target from source of truth

We skip doc tests for any cross compiles (as they don't work) but to detect a
cross compile we checked `--target` but forgot to check other locations like
`CARGO_BUILD_TARGET` or `[build.target]`. This alters the check to ensure that
it verifies from the source of truth whether a cross compilation happened or
not.

Closes #3143

9 years agoAuto merge of #3136 - alexcrichton:warn-bad-override, r=brson
bors [Thu, 6 Oct 2016 00:40:11 +0000 (17:40 -0700)]
Auto merge of #3136 - alexcrichton:warn-bad-override, r=brson

Warn about path overrides that won't work

Cargo has a long-standing [bug] in path overrides where they will cause spurious
rebuilds of crates in the crate graph. This can be very difficult to diagnose
and be incredibly frustrating as well. Unfortunately, though, it's behavior that
fundamentally can't be fixed in Cargo.

The crux of the problem happens when a `path` replacement changes something
about the list of dependencies of the crate that it's replacing. This alteration
to the list of dependencies *cannot be tracked by Cargo* as the lock file was
previously emitted. In the best case this ends up causing random recompiles. In
the worst case it cause infinite registry updates that always result in
recompiles.

A solution to this intention, changing the dependency graph of an overridden
dependency, was [implemented] with the `[replace]` feature in Cargo awhile back.
With that in mind, this commit implements a *warning* whenever a bad dependency
replacement is detected. The message here is pretty wordy, but it's intended to
convey that you should switch to using `[replace]` for a more robust
impelmentation, and it can also give security to anyone using `path` overrides
that if they get past this warning everything should work as intended.

[bug]: https://github.com/rust-lang/cargo/issues/2041
[implemented]: http://doc.crates.io/specifying-dependencies.html#overriding-dependencies

Closes #2041

9 years agotweaking the way the dropdown opens to fix links not working
Jake Goldsborough [Wed, 5 Oct 2016 23:40:10 +0000 (16:40 -0700)]
tweaking the way the dropdown opens to fix links not working

9 years agoAuto merge of #3144 - alexcrichton:less-update-registry, r=brson
bors [Wed, 5 Oct 2016 23:22:25 +0000 (16:22 -0700)]
Auto merge of #3144 - alexcrichton:less-update-registry, r=brson

Avoid updating registry when adding existing deps

Cargo previously erroneously updated the registry whenever a new dependency was
added on a crate which already exists in the DAG. This commit fixes this
behavior by ensuring that if the new dependency matches a previously locked
version it uses that instead.

This commit involved a bit of refactoring around this logic to be a bit more
clear how the locking and "falling back to the registry" is happening.

Closes #2895

9 years agoAdd some docs about JSON messages
Aleksey Kladov [Wed, 5 Oct 2016 18:26:15 +0000 (21:26 +0300)]
Add some docs about JSON messages

9 years agoAuto merge of #3157 - japaric:target-rustflags, r=alexcrichton
bors [Wed, 5 Oct 2016 16:16:15 +0000 (09:16 -0700)]
Auto merge of #3157 - japaric:target-rustflags, r=alexcrichton

add support for per-target rustflags in .cargo/config

you can now specify rustflags on a per-target basis in .cargo/config:

``` toml
[target.x86_64-unknown-linux-gnu]
rustflags = ["x86", "specific", "flags"]

[target.arm-unknown-linux-gnueabi]
rustflags = ["arm", "specific", "flags"]
```

If both build.rustflags and target.*.rustflags are specified, the
target.* ones will be used.

As before RUSTFLAGS overrides either set.

closes #3153

r? @alexcrichton I've only added a smoke test and a precedence test. Let me know if I should add more tests!

9 years agoadd documentation about target.$triple.rustflags
Jorge Aparicio [Wed, 5 Oct 2016 04:59:03 +0000 (23:59 -0500)]
add documentation about target.$triple.rustflags

9 years agoAuto merge of #3163 - brson:docdir, r=alexcrichton
bors [Wed, 5 Oct 2016 00:26:32 +0000 (17:26 -0700)]
Auto merge of #3163 - brson:docdir, r=alexcrichton

Update rust-installer

9 years agoUpdate rust-installer
Brian Anderson [Wed, 5 Oct 2016 00:21:10 +0000 (00:21 +0000)]
Update rust-installer

9 years agoLeak mspdbsrv.exe processes on Windows
Alex Crichton [Tue, 4 Oct 2016 22:59:37 +0000 (15:59 -0700)]
Leak mspdbsrv.exe processes on Windows

Instead of having our job object tear them down, instead leak them intentionally
if everything succeeded.

Closes #3161

9 years agoadd support for per-target rustflags in .cargo/config
Jorge Aparicio [Tue, 4 Oct 2016 01:37:25 +0000 (20:37 -0500)]
add support for per-target rustflags in .cargo/config

you can now specify rustflags on a per-target basis in .cargo/config:

``` toml
[target.x86_64-unknown-linux-gnu]
rustflags = ["x86", "specific", "flags"]

[target.arm-unknown-linux-gnueabi]
rustflags = ["arm", "specific", "flags"]
```

If both build.rustflags and target.*.rustflags are specified, the
target.* ones will be used.

As before RUSTFLAGS overrides either set.

closes #3153

9 years agoAuto merge of #3139 - jhbabon:improve-replace-parsing-error-msg, r=alexcrichton
bors [Mon, 3 Oct 2016 17:52:53 +0000 (10:52 -0700)]
Auto merge of #3139 - jhbabon:improve-replace-parsing-error-msg, r=alexcrichton

Show an error messager for invalid semver spec for packages in the [replace] section.

The `[replace]` section in the `Cargo.toml` file doesn't allow invalid semver specsfor packages, so something like this:

```toml
[dependencies]
foo = "*"

[replace]
"foo:*" = { git = 'https://example.com' }
```

It's not valid. In this case we will display an error message like this:

```
error: failed to parse manifest at `Cargo.toml`

Caused by:
  replacements must specify a valid semver version to replace, but `foo:*` does not

Caused by:
  Parse error
```

closes #3129